package com.demo.designmode.factory.method;

/**
 * @Author: jxm
 * @Description: 纽约披萨店
 * @Date: 2021/7/6 16:07
 * @Version: 1.0
 */
public class NYPizzaStore extends PizzaStore {

    @Override
    Pizza createPizza(String item) {
        Pizza pizza = null;
        if ("cheese".equals(item)) {
            pizza = new NYStyleCheesePizza();
        } else if ("veggie".equals(item)) {
            pizza = new NYStyleVeggiePizza();
        } else if ("clam".equals(item)) {
            pizza = new NYStyleClamPizza();
        }

        return pizza;
    }
}
